<?php
$imgs = Array
(
  0 => "http://localhost/imgs/image1.jpg",
  1 => "http://localhost/imgs/image2.jpg",
  2 => "http://localhost/imgs/image3.jpg",
  3 => "http://localhost/imgs/image4.jpg",
  4 => "http://localhost/imgs/image5.jpg",
  5 => "http://localhost/imgs/image6.jpg",
  6 => "http://localhost/imgs/image7.jpg",
  7 => "http://localhost/imgs/image8.jpg"
);

echo $imgs[array_rand($imgs)];
?>
